package com.devbobcorn.donutopia;

import com.devbobcorn.donutopia.blocks.ModBlocks;
import com.devbobcorn.donutopia.entities.ModEntityTypes;
import com.devbobcorn.donutopia.items.ModItems;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import net.minecraftforge.common.MinecraftForge;
import net.minecraftforge.eventbus.api.IEventBus;
import net.minecraftforge.fml.common.Mod;
import net.minecraftforge.fml.javafmlmod.FMLJavaModLoadingContext;

@Mod(Donutopia.MODID)
public class Donutopia {
    public static final String MODID = "donutopia";

    // Directly reference a log4j logger.
    public static final Logger LOGGER = LogManager.getLogger();

    public Donutopia() {
        LOGGER.info("Donutopia~");

        // Register ourselves for server and other game events we are interested in
        MinecraftForge.EVENT_BUS.register(this);

		//final ModLoadingContext modLoadingContext = ModLoadingContext.get();
		final IEventBus modEventBus = FMLJavaModLoadingContext.get().getModEventBus();

		ModBlocks.BLOCKS.register(modEventBus);
		ModItems.ITEMS.register(modEventBus);
		ModEntityTypes.ENTITY_TYPES.register(modEventBus);
		//ModContainerTypes.CONTAINER_TYPES.register(modEventBus);
		//ModTileEntityTypes.TILE_ENTITY_TYPES.register(modEventBus);

		// Register Configs
		//modLoadingContext.registerConfig(ModConfig.Type.CLIENT, ConfigHolder.CLIENT_SPEC);
		//modLoadingContext.registerConfig(ModConfig.Type.SERVER, ConfigHolder.SERVER_SPEC);
    }
}
